<?php

namespace app\service;

use addons\epay\library\Service;

class PayService
{

    const NOTIFY_URL="";
    const RETURN_URL="";

    public static function pay($type,$out_trade_no,$title,$amount,$method,$openid,$auth_code){

        $params = [
            'type'         => $type,
            'out_trade_no' => $out_trade_no,
            'title'        => $title,
            'amount'       => $amount,
            'method'       => $method,
            'openid'       => $openid,
            'auth_code'    => $auth_code,
            'notifyurl'    => self::NOTIFY_URL,
            'returnurl'    => self::RETURN_URL,
        ];

        return Service::submitOrder($params);
    }


}